<template>
  <div>
    <mytree
      :list='ary'
      @click='f'
    />
  </div>
</template>
<script>
// @ is an alias to /src
import mytree from "./components/tree.vue";
export default {
  name: "XXX",
  data() {
    return {
      ary: [
        {
          text: "层级1—1",
          children: [
            {
              text: "层级1—1-1",
            },
            {
              text: "层级1—1-1",
              children: [{ text: "层级1—1-1-1" }],
            },
          ],
        },
        {
          text: "层级1—2",
          children: [
            {
              text: "层级1—2-1",
            },
          ],
        },
        {
          text: "层级1—3",
        },
      ],
    };
  },
  components: { mytree },
  methods: {
    f() {
      console.log(this);
      this.dialog.flag = true;
    },
  },
};
</script>
<style lang="less">
</style>